package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.SysIdentityType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCompanyTypeMapper;
import com.ruoyi.system.domain.SysCompanyType;
import com.ruoyi.system.service.ISysCompanyTypeService;

/**
 * 企业类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-30
 */
@Service
public class SysCompanyTypeServiceImpl implements ISysCompanyTypeService 
{
    @Autowired
    private SysCompanyTypeMapper sysCompanyTypeMapper;

    /**
     * 查询企业类型
     * 
     * @param id 企业类型主键
     * @return 企业类型
     */
    @Override
    public SysCompanyType selectSysCompanyTypeById(Integer id)
    {
        return sysCompanyTypeMapper.selectSysCompanyTypeById(id);
    }

    /**
     * 查询企业类型列表
     * 
     * @param sysCompanyType 企业类型
     * @return 企业类型
     */
    @Override
    public List<SysCompanyType> selectSysCompanyTypeList(SysCompanyType sysCompanyType)
    {
        return sysCompanyTypeMapper.selectSysCompanyTypeList(sysCompanyType);
    }

    /**
     * 新增企业类型
     * 
     * @param sysCompanyType 企业类型
     * @return 结果
     */
    @Override
    public int insertSysCompanyType(SysCompanyType sysCompanyType)
    {
        sysCompanyType.setCreateTime(DateUtils.getNowDate());
        return sysCompanyTypeMapper.insertSysCompanyType(sysCompanyType);
    }

    /**
     * 修改企业类型
     * 
     * @param sysCompanyType 企业类型
     * @return 结果
     */
    @Override
    public int updateSysCompanyType(SysCompanyType sysCompanyType)
    {
        sysCompanyType.setUpdateTime(DateUtils.getNowDate());
        return sysCompanyTypeMapper.updateSysCompanyType(sysCompanyType);
    }

    /**
     * 批量删除企业类型
     * 
     * @param ids 需要删除的企业类型主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyTypeByIds(Integer[] ids)
    {
        return sysCompanyTypeMapper.deleteSysCompanyTypeByIds(ids);
    }

    /**
     * 删除企业类型信息
     * 
     * @param id 企业类型主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyTypeById(Integer id)
    {
        return sysCompanyTypeMapper.deleteSysCompanyTypeById(id);
    }

    /**
     * 修改证件类型状态
     *
     * @param sysCompanyType 角色信息
     * @return 结果
     */
    @Override
    public int updateSysCompanyTypeStatus(SysCompanyType sysCompanyType)
    {
        return sysCompanyTypeMapper.updateSysCompanyType(sysCompanyType);
    }
}
